#if !defined(_GUI_H)
#define _GUI_H
#include <string>

#include <stdio.h>
#include <stdlib.h>
#include <Pt.h>

#include "Zdarzenia.h"
#include "iKomunikacja.h"


class GUI
{
private:
//okno
	PtWidget_t *window;
	
//glowne przyciski
	PtWidget_t *przycisk_lotnisko;
	PtWidget_t *przycisk_pogoda;
	PtWidget_t *przycisk_samolot;
//przyciski panelu lotnisko
	PtWidget_t *przycisk_lotnisko_awaria_start;
	PtWidget_t *przycisk_lotnisko_awaria_stop;
//przyciski panelu pogoda
	PtWidget_t *przycisk_pogoda_usun;
	PtWidget_t *przycisk_pogoda_dodaj;
//przyciski panelu samolot
	PtWidget_t *przycisk_samolot_awaria_start;
	PtWidget_t *przycisk_samolot_awaria_stop;
	PtWidget_t *przycisk_samolot_tworz;
//listy
	PtWidget_t *list_airport;
	PtWidget_t *list_airport_events;
	PtWidget_t *list_airport_weather;
		PtWidget_t *list_airplane;
	PtWidget_t *list_airplane_events;

PtWidget_t *list_airplane_act;
//tablice ustawien

    PtArg_t arg_a[4];		//lotnisko
    PtArg_t arg_b[4];			//pogoda
    PtArg_t arg_c[4];			//samolot

    PtArg_t arg_a1[4];		//dodaj awarie
    PtArg_t arg_a2[4];		//usun awarie

	PtArg_t arg_b1[4];		//zmien pogode
 

	PtArg_t arg_c1[4];		//dodaj awarie
     PtArg_t arg_c2[4];		//usun awarie
     PtArg_t arg_c3[4];		//utworz samolot
   
public:

	GUI();
	static int push_button_airport(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
     static int push_button_airplane(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
     static int push_button_weather(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);   
     static int push_list_airport(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);   
     static int push_list_events(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);  
     static int push_list_weather(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);  
     int fill_list(PtWidget_t* list);	//wypelnia liste albo lotniskami albo modelami samolotow
     
	//obsluga okna tworzenia samolotow
	
	static int GUI::push_button_create_airplane(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
     static int GUI::push_button_create_airplane_window(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
     static int GUI::push_list_airport_to(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
     static int GUI::push_list_airport_from(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
     static int GUI::push_list_airplane(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
     static int GUI::push_list_airport_from_existing_airplane(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
     static int GUI::push_list_airplane_old(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
	
	// koniec obslugi okna tworzenia samolotow

	// obsluga glownego okna 
	
     static int GUI::push_list_airport_weather(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
    static int GUI::push_list_airplane_events(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
      static int GUI::push_list_airplane_main_window(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
      static int GUI::push_button_airplane_delete_event(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
      static int GUI::push_button_airport_delete_event(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
      static int GUI::push_button_delete_weather(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);

	//koniec obslugi glownego okna 
               
     //obsluga okna dodawania awarii do lotniska
               
      static int GUI::push_button_airport_add_event(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
      static int GUI::push_list_airport_add_event_airport(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
      static int GUI::push_list_airport_add_event_event(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
               
      //koniec obslugi okna dodawania awarii do lotniska
               
      // obsluga okna dodawania pogody
               
      static int GUI::push_button_airport_add_weather(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
      static int GUI::push_list_airport_add_weather_airport(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
      static int GUI::push_list_airport_add_weather_weather(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
               
      //koniec obslugi okna dodawania pogody
      
      // obsluga okna dodawania awarii do samolotu
      
      static int GUI::push_button_airplane_add_event(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);      
      static int GUI::push_list_airplane_add_event_airplane(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
      static int GUI::push_list_airplane_add_event_event(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);

      
      // koniec obslugi okna dodawania awarii do samolotu
      
               
     //static int push_list_airport(PtWidget_t *w, void *data,
     //          PtCallbackInfo_t *cbinfo);   
     
     //tmp
     static int GUI::push_button_actualize(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
     static int GUI::push_list_airplane_act(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);
     static int GUI::push_numeric_level(PtWidget_t *w, void *data,
               PtCallbackInfo_t *cbinfo);

                 
};
#endif  
